﻿@using System.Security.Claims
@if (User.Identities.Any(u => u.IsAuthenticated))
{
    <form asp-area="" asp-controller="Account" asp-action="Logout" method="post" id="logoutForm" class="navbar-right">
        <ul class="nav navbar-nav navbar-right">
            <li>
                <a asp-area="" asp-controller="Account" asp-action="Edit" title="Edit">Hello @User.FindFirst(ClaimTypes.Name).Value</a>
            </li>
            <li>
                <button type="submit" class="btn btn-link navbar-btn navbar-link">退出</button>
            </li>
        </ul>
    </form>
}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li>
            <a asp-area="" asp-controller="Account" asp-action="Login">登录</a>
        </li>
    </ul>
}